<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix='c' uri='http://java.sun.com/jstl/core_rt' %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>My Inbox</title>
<link type="text/css" rel="stylesheet" href="/bob-web/CSS/1.css" />
<link type="text/css" rel="stylesheet" href="/bob-web/CSS/2.css" />
<link type="text/css" rel="stylesheet" href="/bob-web/CSS/3.css" />
<link type="text/css" rel="stylesheet" href="/bob-web/CSS/4.css" />
<link type="text/css" rel="stylesheet" href="/bob-web/CSS/5.css" />
<link type="text/css" rel="stylesheet" href="/bob-web/CSS/6.css" />
<link type="text/css" rel="stylesheet" href="/bob-web/CSS/7.css" />
<link rel="stylesheet" type="text/css" href="/bob-web/CSS/3c-lcrc-static-pp-layout.css" />
<link rel="stylesheet" type="text/css" href="/bob-web/CSS/3c-lcrc-static-pp-presentation.css" />
<link rel="stylesheet" type="text/css" href="/bob-web/CSS/2FEu-VTjHxG.css" />
</head>
<body class="profile">
<!-- left column -->
<div id="lh-col"><br />
  <%@ include file="/WEB-INF/jsp/leftScreen.jsp" %>
</div>
<!-- end of left column -->
<!-- center column -->
<div id="c-col" align="center" >
  <div class="profile_top_wash">
    <div class="profile_color_bar vcard">
      <div id="pagelet_top_bar">
        <div id="c4cd706ade0e242e35533110">
          <div id="profile_top_bar" class="top_bar">
            <div class="profile_top_bar_container">
              <div class="tabs_wrapper clearfix">
                <ul id="profile_tabs" class="tabs">
                  <c:if test="${model.himself}">
                    <li view="info"><a class="tab_link profile_tab" href="/bob-web/service/homePage.htm">Home</a></li>
                    <li view="inbox"><a class="tab_link profile_tab" href="/bob-web/service/inbox.htm">Inbox</a></li>
                    <li class="selected" view="outbox"><a class="tab_link profile_tab" href="/bob-web/service/newMessage.htm">Compose Message</a></li>

                  </c:if>
                </ul>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  <div>
      <div style="width:100%;text-align:left;">

    <table>
      <tr height="100">
        <td>
       <th> Write New Message </th>
        </td>
      </tr>
    </table>
	            

       <form action="/bob-web/service/newMessage.htm" method="POST"  onSubmit="msgBody.value = msgBodyText.innerHTML; ">
           		<div class="UIComposer clearfix UIComposer_STATE_PIC_NONE UIComposer_STATE_INPUT_FOCUSED" id="c4cd6e42e87b4a4653003519">
      <div class="pas UIComposer_Box UIContentBox uiBoxGray">


          <c:if test="${model.selectedUserId != null}">
              &nbsp;&nbsp; To:  <a href="/bob-web/service/myWall.htm?wantedUserId=${model.selectedUserId}"> <b>${model.selectedUser.name} ${model.selectedUser.surname}</b></a> 
              <input id="select_FriendId" name="select_FriendId" type="hidden" value="${ model.selectedUserId}">
          </c:if>
          <c:if test="${model.selectedUserId == null}">
              &nbsp;&nbsp;Select Friend:
                        <select id="select_FriendId" name="select_FriendId">
                                <c:forEach items="${model.user.friends}" var="friend">
                                    <c:if test="${friend.approved == 1}">
                                      <option value="${friend.friend.userId}">${friend.friend.name} ${friend.friend.surname}</option>
                                    </c:if>
                                </c:forEach>
                        </select>

          </c:if>


        <div>       &nbsp;&nbsp; Message: 
          <div class="UIComposer_Content">
            <div class="UIComposer_InputArea_Base UIComposer_InputArea">
              <div class="UIComposer_InputShadow">
                  <div id="msgBodyText"  class="Mentions_Input" contenteditable="true"  style="text-align:left">

                </div>
                  <input id="msgBody" name="msgBody" type="hidden">
              </div>
            </div>
            <div id="composer_buttons">
              <div class="UIComposer_ButtonArea" id="c4cd6e42e87b4a4653003519_buttons">
                <ul class="UIComposer_Buttons">
                  <li class="UIComposer_FormButtons">
                    <label class="UIComposer_SubmitButton uiButton uiButtonConfirm uiButtonLarge">
                    <input value="Send Message"  type="submit">
                    </label>
                  </li>
                  <li class="UIComposer_PrivacyEtc"></li>
                </ul>
				
				<ul class="UIComposer_Attachments" style="visibility: visible; ">
                  <li class="UIComposer_AttachmentPrompt">Title:</li>
                  <li class="UIComposer_Attachment">
                     <input id="msgTitle" name="msgTitle" type='text'>
                  </li>
                </ul>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
                  </form>	
	
	<font size="+1" color="#CC3300" > ${model.retVal}</font>

          </div>
		  <div align="left"><font size="+1" > <a href="/bob-web/service/inbox.htm">< Back To Messages</a></font></div>
  </div>
</div>
<!-- end of center column -->
<!-- right column -->

<div id="rh-col"> <a href="/bob-web/service/homePage.htm"><img border="0" src="/bob-web/Images/logo.png" alt="BookOfBoun" width="180" height="100" /></a>
  <%@ include file="/WEB-INF/jsp/rightScreen.jsp" %>
</div>
<!-- end of right column -->
</body>
</html>